package cn.heima.com;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class Demo4 {
    public static void main(String[] args) throws Exception {
        method1();

    }

    private static void method1() throws IOException {
        FileInputStream fileInputStream = new FileInputStream("Day11\\aaa.txt");
        FileOutputStream fileOutputStream = new FileOutputStream("Day11\\bbb.txt");
        int len ;
        byte[] arr= new byte[1024];
        while((len = fileInputStream.read(arr))!=-1){
            fileOutputStream.write(arr,0,len);
        }
        fileInputStream.close();
        fileOutputStream.close();
    }
}
